{% load static %}
<!DOCTYPE html>
<html>

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    

    <title>H+ 后台主题UI框架 - 登录</title>
    <meta name="keywords" content="H+后台主题,后台bootstrap框架,会员中心主题,后台HTML,响应式后台">
    <meta name="description" content="H+是一个完全响应式，基于Bootstrap3最新版本开发的扁平化主题，她采用了主流的左右两栏式布局，使用了Html5+CSS3等现代技术">

    <link rel="shortcut icon" href="favicon.ico"> <link href="{% static 'third/hui/css/bootstrap.min.css' %}" rel="stylesheet">
    <link href="{% static 'third/hui/css/font-awesome.min.css' %}" rel="stylesheet">
    <link rel="stylesheet" href="{% static 'third/layui/plugins/layui/css/layui.css' %}" media="all" />
    <link href="{% static 'third/hui/css/animate.min.css' %}" rel="stylesheet">
    <link href="{% static 'third/hui/css/style.min.css' %}" rel="stylesheet"><base target="_blank">
    <!--[if lt IE 8]>
    <meta http-equiv="refresh" content="0;ie.html" />
    <![endif]-->
    <link rel="stylesheet" href="{% static 'third/layui/plugins/layui/css/layui.css' %}" media="all" />
    <script type="text/javascript" src="{% static 'third/layui/plugins/layui/layui.js' %}"></script>
    <script src="{% static 'third/hui/js/jquery.min.js' %}"></script>
    <script src="{% static 'third/hui/js/bootstrap.min.js' %}"></script>
    <script>if(window.top !== window.self){ window.top.location = window.location;}</script>
</head>

<body class="gray-bg">

    <div class="middle-box text-center loginscreen  animated fadeInDown">
        <div>
            <div>

                <h1 class="logo-name">HF</h1>

            </div>
            <h3>海风测试管理</h3>

            <form class="m-t" role="form">
                <div class="form-group">
                    <input type="text" name="phone" class="form-control" placeholder="手机号" value="15555555555" required="">
                </div>
                <div class="form-group">
                    <input type="password" name="password" class="form-control" placeholder="密码" value="123456" required="">
                </div>
                <span id="login-btn" class="btn btn-primary block full-width m-b">登 录</span>
                <p class="text-muted text-center"> <a href="login.html#"><small>忘记密码了？</small></a> | <a href="register.html">注册一个新账号</a>
                </p>

            </form>
        </div>
    </div>

    <script>
        $.ajaxSetup({
            data: {csrfmiddlewaretoken: '{{ csrf_token }}' },
        });
        $(function () {
            $("#login-btn").click(function () {
                var obj={}
                obj['phone']=$.trim($("input[name=phone]").val())
                obj['password']=$.trim($("input[name=password]").val())
                $.post( 'doLogin', obj, function( data ) {
                    if( data.code != 200 ) {
                        alert(data.message)
                        $( '.login-tips' ).text( data.message );
                    }
                    else {
                        location.href = "/main/index";
                    }
                    layui.use('layer', function(){var layer = layui.layer.closeAll();});
                }, 'json' )
            })
        })
    </script>
</body>

</html>